package cn.edu.hunau.java.week02.day02.afternoon;

public class Point {
    public int x;
    public int y;
    public Point(){

    }
    public Point(int x, int y){
        this.x=x;
        this.y=y;
    }
    public double distance(Point p){
        return Math.sqrt(Math.pow(p.x-x,2)+Math.pow(p.y-y,2));
    }
    public double distance(int x,int y){
        return this.distance(new Point(x,y));
    }
    public double distance(){
        return this.distance(new Point(0,0));
    }
}